home *** CD-ROM | disk | FTP | other *** search
-
- MODEM INTERFACING:
- ══════════════════
-
- The MODEM.PAS library shows how to interface a modem by using the pro-
- cedures offered with SERIAL PORTS MANAGER. You could insert in it some
- other sequences of HAYES commands, or write a special interfacing adapted
- to some other modems NOT HAYES compatibles...
-
- MODEM.C is the translation of MODEM.PAS in Turbo-C (C).
-
- For the assembler, it is sufficient to proceed in a similar way.
-
- A simple demonstration of how to use each of these libraries is distri-
- -buted with SERIAL PORTS MANAGER: TESTMODP.EXE (for MODEM.PAS) and
- TESTMODC.EXE (for MODEM.C).
- !! ATTENTION: modify the "CommPort" variable in these programs before
- !! compiling them, in order to use the serial port on which your modem
- !! is physically installed !
-
- ┌──────────────────────────────────────────────┐
- │Globals variables (PASCAL and C types: PAS/C) │
- └──────────────────────────────────────────────┘
- ModemUsed SHORTINT/byte Modem type used: Hayes or Minitel ?
- Permit to send the specifics commands
- associated to the modem to drive !
- Its initial value is 'Hayes'.
- MINITEL <---> TlTex
- HAYES <---> Hayes
- DTR_Cmde BOOLEAN/byte Using DTR as a command prefix or NOT ?
- Default is TRUE. IF this variable is
- set to FALSE, the following prefix
- MUST be sent first before each command.
- HAYESPrefix STRING[3]/char[4] Command prefix for the HAYES modems.
- '+++' = default value.
- PulseDial BOOLEAN/byte TRUE if you want a pulsed call, FALSE
- if you need a frequency call.
- Its default value is TRUE.
- connected BOOLEAN/byte Informes on the connection status. TRUE
- if the line is connected, FALSE if not.
- Is up-dated by the clock interrupt
- function. FALSE is its intial value.
- Show_CorF BOOLEAN/byte Write the connection sign on the screen?
- TRUE => The sign is written each second
- on the screen when the clock interrupt
- procedure is installed.
- Default value is FALSE.
- Int1CSave POINTER/<NIL> Stores the INT 1Ch vector initial value.
- Used to activate or disactivate the clock
- interrupt procedure in the PASCAL library.
-
- ┌─────────────────────────────────┐
- │Available procedures (PAS and C):│
- └─────────────────────────────────┘
- 1°/ To send any command to the modem:
- PROCEDURE CmdeToModem(TypCmde: BYTE;DataCmde: CmdeStr);
- void CmdeToModem(byte TypCmde, char *DataCmde)
- Possible values for 'TypCmde':
- Personal command <---> Generique
- Initialization <---> InitMod
- Connection <---> Connect
- Call a given number <---> Appel
- Hand-off the line <---> Raccroch
- Minitel "Connex/Fin" <---> ConnexFin
-
- 2°/ Clock interrupt made to check the connection status:
- PROCEDURE Check_HModem_State; INTERRUPT;
-
- 3°/ To have more informations, report yourself to the listing... Specially
- in C, the 2 following procedures permit to install/uninstall the clock
- interrupt made to check the connection status...
- void install_Clock(byte com)
- void un_install_Clock()